package com.py.credit.entity.enums;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import com.py.credit.entity.common.OptionalColumn;

/**
 * 承诺书
 * 
 * @author dd
 *
 */
public enum PromiseBooksByZtEnum {

	
//	ID("id", "主键", "varchar", "input", false, false, new HashMap<String, String>(), false, false),
//	/**
//     * 承诺书状态
//     */
//	BOOK_STATUS("bookStatus", "承诺书状态", "varchar", "select", true, false, new HashMap<String, String>(){
//		private static final long serialVersionUID = 1L;
//		{
//			put("1", "待审核");
//			put("2", "审核通过");
//			put("3", "驳回");
//		}
//	}, false, false),
	/**
     * 承诺书类型
     */
	TYPE("type", "承诺书类型", "varchar", "select", true, false, new HashMap<String, String>() {
		private static final long serialVersionUID = 1L;
		{
			put("ZD", "主动承诺和行业自律型承诺");
			put("SP", "审批替代型承诺");
			put("RQ", "容缺受理型承诺");
			put("SX", "失信修复型承诺");
		}
	}, true, false),
	/**
     * 主体名称
     */
//	ZT_NAME("ztName", "主体名称", "varchar", "input", true, true, new HashMap<String, String>(), true, true),
	/**
     * 统一社会信用代码
     */
//	TYSHXYDM("tyshxydm", "主体代码", "varchar", "input", true, false, new HashMap<String, String>(), true, false),
	NAME("name", "承诺书名称", "varchar", "input", true, true, new HashMap<String, String>(), true, true),
	/**
     * 上传部门
     */
	REPORT_DEPT("reportDept", "组织开展承诺部门", "varchar", "input", true, true, new HashMap<String, String>(), true, false),
	CNRQ("cnrq", "承诺日期", "timestamp", "input", true, false,new HashMap<String, String>(), true, false);
	
	/**
     * 上报时间
     */
//	REPORT_TIME("reportTime", "上报时间", "timestamp", "input", true, false,new HashMap<String, String>(), true, false),
    /**
     * 承诺书图片路径
     */
//	PATH("path", "承诺书路径", "varchar", "input", false, false, new HashMap<String, String>(), false, false),
    /**
     * 统一编码
     */
//	TYBM("tybm", "统一编码", "varchar", "input", false, false, new HashMap<String, String>(), false, false),
    /**
     * 主体类型
     */
//	ZT_TYPE("ztType", "主体类型", "varchar", "select", true, false, new HashMap<String, String>(){
//		private static final long serialVersionUID = 1L;
//		{
//			put("100000", "法人");
//			put("100001", "自然人");
//			put("100002", "非企业法人");
//		}
//	}, false, false),
    /**
     * 上传部门id
     */
//	DEPT_ID("dept_id", "上传部门id", "varchar", "select", false, false, new HashMap<String, String>(), false, false),
//	report_user_id  上报用户
	/**
	 * report_user_name 上报用户
	 */
	//REPORT_USER_NAME("reportUserName", "上报用户", "varchar", "input", true, false,new HashMap<String, String>(), true, false),

//	approval_user_id
//	approval_user_name  审批用户
//	APPROVAL_USER_NAME("approvalUserName", "审核用户", "varchar", "input", true, false,new HashMap<String, String>(), true, false),
//	area_id
//	area_name   区域
//	AREA_NAME("AREA_NAME", "审批时间", "timestamp", "input", true, false,new HashMap<String, String>(), true, false),
    /**
     * 审批时间
     */
	//APPROVAL_TIME("approvalTime", "审核时间", "timestamp", "input", true, false,new HashMap<String, String>(), true, false),
//    /**
//     * 审批意见
//     */
//	APPROVAL_OPINION("approvalOpinion", "驳回意见", "text", "input", true, false, new HashMap<String, String>(), true, false);
//	
//	HAVBOOK("havBook", "是否包含承诺书", "varchar", "select", false, false, new HashMap<String, String>(){
//		private static final long serialVersionUID = 1L;
//		{
//			put("0", "不包含");
//			put("1", "包含");
//		}
//	}, false, false);
    /**
     * 关联状态
     */
//	RELATION_STATUS("relation_status", "关联状态", "varchar", "select", true, false, new HashMap<String, String>(){
//		private static final long serialVersionUID = 1L;
//		{
//			put("0", "未关联");
//			put("1", "已关联");
//			put("2", "可关联");
//		}
//	}, true, false);
    /**
     * 是否删除
     */
//	IS_DEL("is_del", "是否删除", "textarea", "input", false, false, new HashMap<String, String>(){
//		private static final long serialVersionUID = 1L;
//		{
//			put("Y", "已删除");
//			put("N", "未删除");
//		}
//	}, false, false);
	
	

	

	private String colNameEN;
	private String colNameCN;
	private String type;
	private boolean defaultShow;
	private boolean advanceConditionShow;
	private String widget;
	private boolean fuzzy;
	private HashMap<String, String> widgetValue;
	private boolean searchIsShow;

	private PromiseBooksByZtEnum(String colNameEN, String colNameCN, String type, String widget, boolean defaultShow,
			boolean fuzzy, HashMap<String, String> widgetValue, boolean advanceConditionShow, boolean searchIsShow) {
		this.colNameEN = colNameEN;
		this.colNameCN = colNameCN;
		this.type = type;
		this.widget = widget;
		this.defaultShow = defaultShow;
		this.fuzzy = fuzzy;
		this.widgetValue = widgetValue;
		this.advanceConditionShow = advanceConditionShow;
		this.searchIsShow = searchIsShow;
	}

	public String getColNameEN() {
		return colNameEN;
	}

	public void setColNameEN(String colNameEN) {
		this.colNameEN = colNameEN;
	}

	public String getColNameCN() {
		return colNameCN;
	}

	public void setColNameCN(String colNameCN) {
		this.colNameCN = colNameCN;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public boolean isDefaultShow() {
		return defaultShow;
	}

	public void setDefaultShow(boolean defaultShow) {
		this.defaultShow = defaultShow;
	}

	public HashMap<String, String> getWidgetValue() {
		return widgetValue;
	}

	public void setWidgetValue(HashMap<String, String> widgetValue) {
		this.widgetValue = widgetValue;
	}

	public String getWidget() {
		return widget;
	}

	public void setWidget(String widget) {
		this.widget = widget;
	}

	public boolean isFuzzy() {
		return fuzzy;
	}

	public void setFuzzy(boolean fuzzy) {
		this.fuzzy = fuzzy;
	}

	public boolean isAdvanceConditionShow() {
		return advanceConditionShow;
	}

	public void setAdvanceConditionShow(boolean advanceConditionShow) {
		this.advanceConditionShow = advanceConditionShow;
	}

	public boolean isSearchIsShow() {
		return searchIsShow;
	}

	public void setSearchIsShow(boolean searchIsShow) {
		this.searchIsShow = searchIsShow;
	}

	public static List<OptionalColumn> getOptionalColumns() {

		List<OptionalColumn> OptionalColumns = new ArrayList<OptionalColumn>();

		PromiseBooksByZtEnum[] values = PromiseBooksByZtEnum.values();

		for (PromiseBooksByZtEnum value : values) {

			OptionalColumn optionalColumn = new OptionalColumn(value.getColNameEN(), value.getColNameCN(),
					value.getType(), value.isDefaultShow(), value.getWidget(), value.isFuzzy(), value.getWidgetValue(),
					value.isSearchIsShow());
			OptionalColumns.add(optionalColumn);

		}
		return OptionalColumns;

	}

	public static List<OptionalColumn> getAdvancedConditionColumns() {

		List<OptionalColumn> OptionalColumns = new ArrayList<OptionalColumn>();

		PromiseBooksByZtEnum[] values = PromiseBooksByZtEnum.values();

		for (PromiseBooksByZtEnum value : values) {

			if (value.isAdvanceConditionShow()) {

				OptionalColumn optionalColumn = new OptionalColumn(value.getColNameEN(), value.getColNameCN(),
						value.getType(), value.isDefaultShow(), value.getWidget(), value.isFuzzy(),
						value.getWidgetValue(), value.isSearchIsShow());
				OptionalColumns.add(optionalColumn);
			}

		}
		return OptionalColumns;

	}

	public static List<String> getDefaultShowColumnEN() {

		List<String> columns = new ArrayList<String>();

		PromiseBooksByZtEnum[] values = PromiseBooksByZtEnum.values();

		for (PromiseBooksByZtEnum value : values) {

			if (value.isDefaultShow()) {

				columns.add(value.getColNameEN());
			}

		}
		return columns;

	}

}
